package designMode.statePattern;

/**
 * @author LIBOFEI
 * @ClassName Test
 * @description 状态设计模式
 * @date 2020/6/28 15:48
 * @Version 1.0
 **/
public class Test {

    public static void main(String[] args) {

        GumballMachine machine = new GumballMachine(3);

        machine.turnCrank();

        machine.insertQuarter();

        machine.ejectQuarter();

        machine.turnCrank();

        machine.insertQuarter();
        machine.turnCrank();
        machine.ejectQuarter();

        machine.insertQuarter();
        machine.insertQuarter();
    }
}
